How to Setup NSSM
Setting up NSSM to Auto-start Caddy
Downloads
1.Please add Caddy and NSSM to your enviroment variables shown here
- Open an administrative powershell
- Type commmand below to register a service
nssm install Caddy
- Now it will show NSSM GUI
- Configure like below
Path= Your Caddy.exe (IE C:\Tools\Caddy\caddy.exe
)
Startup Directory= Your Root Caddy folder (IE C:/Tools/Caddy
)
Arguments= this will be the command your run to start caddy in the background
(IE run --config Caddyfile
)
When done it should look like this
-
Now Select Install Service
-
Start the service in the administrative powershell by running
nssm start caddy
(so if you name it something else in the nssm install myappname it will be nssm install sonarr to setup in nssm gui and nssm start sonarr to auto start the service)
- You can check to see if its running succesful by typing
nssm status Caddy
- To restart it
nssm restart Caddy
- To stop the service
nssm stop Caddy